#ifndef __ATLAS_UUID_INCLUDE__
#define __ATLAS_UUID_INCLUDE__

struct A_UUID
{
	_U32 data1;
	_U16 data2;
	_U16 data3;
	_U8 data4;
	_U8 data5;
	_U8 data6;
	_U8 data7;
	_U8 data8;
	_U8 data9;
	_U8 data10;
	_U8 data11;
	
	A_UUID()
	{
		memset(this, 0, sizeof(A_UUID));
	}

	A_UUID(const A_UUID& uuid)
	{
		*this =	uuid;
	}

	bool operator<(const A_UUID& n) const
	{
		return memcmp(this, &n, sizeof(n))<0;
	}

	bool operator==(const A_UUID& n) const
	{
		return (data1 == n.data1)
				&&(data2 == n.data2)
				&&(data3 == n.data3)
				&&(data4 == n.data4)
				&&(data5 == n.data5)
				&&(data6 == n.data6)
				&&(data7 == n.data7)
				&&(data8 == n.data8)
				&&(data9 == n.data9)
				&&(data10 == n.data10)
				&&(data11 == n.data11);
	}

	bool operator != (const A_UUID& n) const
	{
		return !(*this == n);
	}

	bool isEmpty() const
	{
		A_UUID empty_uuid;
		return (empty_uuid == *this);
	}
};

void AUuidToString(const A_UUID& uuid, char* str);
bool AUuidFromString(const char* str, A_UUID& uuid);
void AUuidGenerate(A_UUID& uuid);

#endif // __ATLAS_UUID_INCLUDE__
